<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Change stream options</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="streamwrapper.stream-lock.html">streamWrapper::stream_lock</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="streamwrapper.stream-open.html">streamWrapper::stream_open</a></div>
 <div class="up"><a href="class.streamwrapper.html">streamWrapper</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="streamwrapper.stream-metadata" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">streamWrapper::stream_metadata</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.4.0)</p><p class="refpurpose"><span class="refname">streamWrapper::stream_metadata</span> &mdash; <span class="dc-title">Change stream options</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-streamwrapper.stream-metadata-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span> <span class="methodname"><strong>streamWrapper::stream_metadata</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$path</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$option</code></span>
   , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>
   )</div>

  <p class="para rdfs-comment">
   This method is called to set metadata on the stream. It is called when one of the following functions is called on a stream URL:
  <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.touch.html" class="function">touch()</a></span></li>
    <li class="member"><span class="function"><a href="function.chmod.html" class="function">chmod()</a></span></li>
    <li class="member"><span class="function"><a href="function.chown.html" class="function">chown()</a></span></li>
    <li class="member"><span class="function"><a href="function.chgrp.html" class="function">chgrp()</a></span></li>
  </ul>
  Please note that some of these operations may not be available on your system.
  </p>
 <blockquote class="note"><p><strong class="note">Note</strong>: 
  <span class="simpara">The function is available since PHP 5.4.0.</span>
 </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-streamwrapper.stream-metadata-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">path</code></em></dt>

     <dd>

      <p class="para">
       The file path or URL to set metadata.  Note that in the case of a URL, it must be a :// delimited
       URL.  Other URL forms are not supported.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">option</code></em></dt>

     <dd>

      <p class="para">
       One of:
       <ul class="simplelist">
        <li class="member"><strong><code>STREAM_META_TOUCH</code></strong> (The method was called in response to <span class="function"><a href="function.touch.html" class="function">touch()</a></span>)</li>
        <li class="member"><strong><code>STREAM_META_OWNER_NAME</code></strong> (The method was called in response to <span class="function"><a href="function.chown.html" class="function">chown()</a></span> with string parameter)</li>
        <li class="member"><strong><code>STREAM_META_OWNER</code></strong> (The method was called in response to  <span class="function"><a href="function.chown.html" class="function">chown()</a></span>)</li>
        <li class="member"><strong><code>STREAM_META_GROUP_NAME</code></strong> (The method was called in response to <span class="function"><a href="function.chgrp.html" class="function">chgrp()</a></span>)</li>
        <li class="member"><strong><code>STREAM_META_GROUP</code></strong> (The method was called in response to <span class="function"><a href="function.chgrp.html" class="function">chgrp()</a></span>)</li>
        <li class="member"><strong><code>STREAM_META_ACCESS</code></strong> (The method was called in response to  <span class="function"><a href="function.chmod.html" class="function">chmod()</a></span>)</li>
       </ul>
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">value</code></em></dt>

     <dd>

      <p class="para">
       If <em><code class="parameter">option</code></em> is
       <ul class="simplelist">
        <li class="member"><strong><code>STREAM_META_TOUCH</code></strong>: <span class="type"><a href="language.types.array.html" class="type Array">Array</a></span> consisting of two arguments of the <span class="function"><a href="function.touch.html" class="function">touch()</a></span>
        function.</li>
        <li class="member"><strong><code>STREAM_META_OWNER_NAME</code></strong> or <strong><code>STREAM_META_GROUP_NAME</code></strong>:
        The name of the owner user/group as <span class="type"><a href="language.types.string.html" class="type string">string</a></span>.</li>
        <li class="member"><strong><code>STREAM_META_OWNER</code></strong> or <strong><code>STREAM_META_GROUP</code></strong>:
        The value owner user/group argument as <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>.</li>
        <li class="member"><strong><code>STREAM_META_ACCESS</code></strong>: The argument of the <span class="function"><a href="function.chmod.html" class="function">chmod()</a></span> as <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>.</li>
       </ul>
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-streamwrapper.stream-metadata-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
   If <em><code class="parameter">option</code></em> is not implemented, <strong><code>FALSE</code></strong> should be
   returned.
  </p>
 </div>




 <div class="refsect1 seealso" id="refsect1-streamwrapper.stream-metadata-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.touch.html" class="function" rel="rdfs-seeAlso">touch()</a> - 设定文件的访问和修改时间</span></li>
    <li class="member"><span class="function"><a href="function.chmod.html" class="function" rel="rdfs-seeAlso">chmod()</a> - 改变文件模式</span></li>
    <li class="member"><span class="function"><a href="function.chown.html" class="function" rel="rdfs-seeAlso">chown()</a> - 改变文件的所有者</span></li>
    <li class="member"><span class="function"><a href="function.chgrp.html" class="function" rel="rdfs-seeAlso">chgrp()</a> - 改变文件所属的组</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="streamwrapper.stream-lock.html">streamWrapper::stream_lock</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="streamwrapper.stream-open.html">streamWrapper::stream_open</a></div>
 <div class="up"><a href="class.streamwrapper.html">streamWrapper</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
